package org.os.framework.context.model;

import java.io.Serializable;


import com.fasterxml.jackson.annotation.JsonInclude;

import lombok.Builder;
import lombok.Data;

/**
 * 响应数据结构
 * 
 * @author weizuxiao
 */
@Data
@Builder
public class ResponseBody implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 会话ID
     */
    // @Builder.Default
    // private String sessionId = ServletContext.getHttpServletRequest().getRequestedSessionId();

    /**
     * 业务是否成功
     */
    private Boolean success;

    /**
     * 业务状态码
     */
    private String status;

    /**
     * 响应消息
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String message;

    /**
     * 响应数据
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Object data;

    /**
     * 当前时间戳
     */
    @Builder.Default
    private Long timestamp = System.currentTimeMillis();

}
